package com.dc.system.mapper;


import com.dc.system.dto.SysUserDTO;
import com.dc.system.model.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface UserMapper {
    //根据账号和密码获取用户信息
    SysUser getUserByAccountAndPwd(SysUser sysUser);
    //添加用户
    int addUser(SysUser user);
    //根据id获取用户
    SysUserDTO getUserById(int userId);
    //修改用户
    int updateUser(SysUserDTO userById);
    //添加用户部门关联
    int addUserDept(Map map);
    //添加用户角色关联
    int addUserRole(Map map);
    //删除用户部门关联
    int delUserDept(int userId);
    //删除用户角色关联
    int delUserRole(int userId);
    //列表/高级查询用户信息
    List<SysUserDTO> getUsers(Map map);
}
